package com.lanou3g.ptp.grade.service;

import com.lanou3g.ptp.entity.*;
import com.lanou3g.ptp.vo.MyGradesParam;

import java.util.List;

public interface GradeService {
    void insertGrade(Grade grade);

    void updateGrade(Grade grade);

    List<Grade> findAll();

    Grade findById(Long id);

    void deleteById(Long id);

    void deleteGradeRoleById(Long id);

    void deleteByIds(Integer[] ids);

    List<Long> findByTaskId(Long taskId);

    int addGradeTeacher(GradeTeacher gradeTeacher);

    GradeTeacher findGradeTeacherByStudentIdAndTaskId(Long studentId, Long taskId);

    /**
     * 教师给学生打分
     *
     * @param teacher
     * @param gradeItem
     * @return
     */
    boolean postGrade(Teacher teacher, GradeItem gradeItem);

    MyGrades getMyGrades(MyGradesParam myGradesParam, Long teacherId, Long studentId);

    Integer getFinalEvaluate(Long taskId);
}
